{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<section class="panel">
    <header class="panel-heading">
        <h4>账变记录</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="">
                <div class="form-group">
                    <div class="col-xs-1 no-pd-r">
                        <select name="type" id="type" class="form-control">
                            <option value="0">账户类型</option>
                            <option {if $Request.get.type == 'mobile'} selected {/if} value="mobile">用户账号</option>
                            <option {if $Request.get.type == 'sn_id'} selected {/if} value="sn_id">机器编号</option>
                        </select>
                    </div>
                    <div class="col-xs-2 no-pd-l">
                        <input type="text" id="keyword" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入内容搜索">
                    </div>

                <div class="col-xs-2 no-pd-2">
                    <input type="text" value="{$Request.get.startTime}" name="startTime" id="startTime" class="form-control" placeholder="请输入开始时间">
                </div>
                <div class="col-xs-2 no-pd-2">
                    <input type="text" value="{$Request.get.endTime}" name="endTime" id="endTime" class="form-control" placeholder="请输入结束时间">
                </div>

                <button type="submit" class="btn btn-color">搜索</button>

            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">id</th>
                <th class="text-center">会员账号</th>
                <th class="text-center">机器编号</th>
                <th class="text-center">流水金额</th>
                <th class="text-center">订单编号</th>
                <th class="text-center">时间</th>
            </tr>
            </thead>
            <tbody>
            {if !empty($list)}
            {foreach $list as $entity}
            <tr>
                <form class="form-horizontal" method="post" onsubmit="return false" role="form">
                    <td class="text-center">{$entity->id}</td>
                    <td class="text-center">{$entity->mobile}</td>
                    <td class="text-center">{$entity->sn_id}</td>
                    <td class="text-center">{$entity->money}</td>
                    <td class="text-center">{$entity->ext_seq_id}</td>
                    <td class="text-center">{$entity->create_time}</td>
                </form>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="7">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($list->render())}
        </div>
    </div>
</section>
{/block}


{block name="footer"}
<form action="{:url('admin/user/exportfzBncLog')}" id="exportForm">
    <input type="hidden" name="type" id="e_type">
    <input type="hidden" name="keyword" id="e_keyword">
</form>
<script src="__PUBLIC__/admin/js/laydate/laydate.js"></script>
<script>
    //导出会员信息
    $("#export").click(function(){
        var keyword = $("#keyword").val();
        var type = $("#type").val();
        $('#e_keyword').val(keyword);
        $('#e_type').val(type);
        $("#exportForm").submit();
    })
    laydate.render({
        elem: '#startTime',
        type: 'datetime'
    });
    laydate.render({
        elem: '#endTime',
        type: 'datetime'
    });
</script>
{/block}
